package model

import (
	"gorm.io/gorm"
	"time"
)

type Comments struct {
	Id        uint64         `gorm:"column:id;type:bigint UNSIGNED;primaryKey;not null;" json:"id"`
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime(3);not null;" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;type:datetime(3);not null;" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
	ArticleId uint32         `gorm:"column:article_id;type:int UNSIGNED;comment:文章id;not null;" json:"article_id"` // 文章id
	Common    string         `gorm:"column:common;type:varchar(255);comment:评论内容;not null;" json:"common"`         // 评论内容
	Like      uint32         `gorm:"column:like;type:int UNSIGNED;comment:评论点赞量;not null;" json:"like"`            // 评论点赞量
	Num       uint32         `gorm:"column:num;type:int UNSIGNED;comment:评论数量;not null;" json:"num"`               // 评论数量
	Reply     string         `gorm:"column:reply;type:varchar(255);comment:评论回复;not null;" json:"reply"`           // 评论回复
}
